|
HSL 2.0 framework
Description of the framework
|
Class for generating a SHA-2 hash value. More..
Public Member Functions | |
| def | __init__ (self, size=512) |
| Constructor. More... | |
| def | update (self, data) |
| Updates the SHA2 hash value with the transferred data. More... | |
| def | digest (self) |
| Returns the SHA2 code. More... | |
| def | hex_digest (self) |
| Returns the SHA2 code as a hex string. More... | |
Class to generate a SHA-2 hash value
Part of the packet for encryption
If a telegram is received at input PIN_I_DO_HASH, a hash code is formed for the data block (string) at input PIN_I_DATA. Depending on the value of the telegram it is selected which method is used for this. Then at output PIN_O_HEXCODE the hash code is output as a hexadecimal number
| def hsl20_4_crypto.hsl20_4_crypto.SHA2Hash.__init__ | ( | self, | |
size = 512 |
|||
| ) |
Constructor
| size | int Length of the hash value. Possible values: 224, 256, 384 and 512 |
| def hsl20_4_crypto.hsl20_4_crypto.SHA2Hash.digest | ( | self | ) |
Returns the SHA2 code
| def hsl20_4_crypto.hsl20_4_crypto.SHA2Hash.hex_digest | ( | self | ) |
Returns the SHA2 code as a hex string
| def hsl20_4_crypto.hsl20_4_crypto.SHA2Hash.update | ( | self, | |
| data | |||
| ) |
Updates the SHA2 hash value with the transferred data
| data | string Data block |
1.8.13